function [ vehicles ] = read_vehicles
%UNTITLED3 Summary of this function goes here
%   Detailed explanation goes here
vehicles=[];

truck_path='Vehicles/Trucks';
truck_dir=dir(truck_path);

for i=1:size(truck_dir, 1)
    name=truck_dir(i).name;
    side=regexp(name, '_([sfb]\d*)\.', 'tokens');
    if size(side, 1)==1
        full_path=strcat(truck_path,'/', name);
        veh=vehicle(full_path);
        veh.vehicle_type='truck';
        veh.camera_angle=side{1,1}{1};
        vehicles=[vehicles, veh];
    end
end
    
car_path='Vehicles/Cars';
car_dir=dir(car_path);
 
for i=1:size(car_dir, 1)
    name=car_dir(i).name;
    side=regexp(name, '_([sfb]\d*)\.', 'tokens');
    if size(side, 1)==1
        full_path=strcat(car_path,'/', name);
        veh=vehicle(full_path);
        veh.vehicle_type='car';
        veh.camera_angle=side{1,1}{1};
        vehicles=[vehicles, veh];
    end
end


SUV_path='Vehicles/SUVs';
SUV_dir=dir(SUV_path);
 
for i=1:size(SUV_dir, 1)
    name=SUV_dir(i).name;
    side=regexp(name, '_([sfb]\d*)\.', 'tokens');
    if size(side, 1)==1
        full_path=strcat(SUV_path,'/', name);
        veh=vehicle(full_path);
        veh.vehicle_type='SUV';
        veh.camera_angle=side{1,1}{1};
        vehicles=[vehicles, veh];
    end
end



sport_path='Vehicles/Sport';
sport_dir=dir(sport_path);
 
for i=1:size(sport_dir, 1)
    name=sport_dir(i).name;
    side=regexp(name, '_([sfb]\d*)\.', 'tokens');
    if size(side, 1)==1
        full_path=strcat(sport_path,'/', name);
        veh=vehicle(full_path);
        veh.vehicle_type='sport';
        veh.camera_angle=side{1,1}{1};
        vehicles=[vehicles, veh];
    end
end
    
end

